package com.system.transfer.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.system.employee.entity.Employee;


@Entity
@Table(name="t_transfer")
public class Transfer {
	private Long transferId;
	private String prePart;//原部门
	private String prePosition;//原职位
	private Date transferTime;
	private String other;//调动描述
	private Employee employee;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getTransferId() {
		return transferId;
	}
	public String getPrePart() {
		return prePart;
	}
	
	public String getPrePosition() {
		return prePosition;
	}
	
	@JsonFormat(pattern = "yyyy/MM/dd",timezone="GMT+8")
	@Temporal(TemporalType.DATE)
	public Date getTransferTime() {
		return transferTime;
	}
	public String getOther() {
		return other;
	}
	@ManyToOne
	@JoinColumn
	public Employee getEmployee() {
		return employee;
	}
	
	
	
	public void setEmployee(Employee employee) {
		this.employee = employee;
	}
	public void setTransferId(Long transferId) {
		this.transferId = transferId;
	}
	public void setPrePart(String prePart) {
		this.prePart = prePart;
	}
	
	public void setPrePosition(String prePosition) {
		this.prePosition = prePosition;
	}
	
	public void setTransferTime(Date transferTime) {
		this.transferTime = transferTime;
	}
	public void setOther(String other) {
		this.other = other;
	}
	
}
